package com.atguigu.springcloud.alibaba.service;

import com.atguigu.springcloud.alibaba.domain.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: 19shusheng.com
 * @Description:
 * @Date: Created in 12:00 2021/3/9
 * @Modified By:
 */
@FeignClient(value = "seata-storage-service")
public interface StorageService {
    /**
     *  根据商品商品id
     *  减少库存
     * @param productId
     * @param count
     * @return CommonResult
     */
    @PostMapping(value = "/storage/decrease")
    CommonResult decrease(@RequestParam("productId") Long productId,@RequestParam("count") Integer count);
}
